package cn.xhjava.crm.commons.exception;

import cn.xhjava.crm.commons.util.ExceptionUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * Author:   XiaHu
 * Date:     2023/6/27
 * <p>
 * 全局异常处理器
 * 暂时不需要
 */
// @ControllerAdvice
public class SysExceptionAdvice {
    private static final Logger logger = LoggerFactory.getLogger(SysHandlerExceptionResolver.class);

    @ExceptionHandler(Exception.class)
    public void doException(Exception ex) {
        logger.error(ExceptionUtil.getStackTrace(ex));
//        ReturnObject returnObject = new ReturnObject();
//        returnObject.setCode(SysContants.RETURN_OBJECT_CODE_FAIL);
//        returnObject.setMessage(ex.getMessage());
    }

}
